﻿@model MobileSales.Model.Orders.OrderItem

@{
    View.Title = Strings.Orders + " - " + Strings.EditItem;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@Strings.Orders &nbsp;&raquo;&nbsp; @Strings.EditItem</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>@Strings.Fields</legend>

        @Html.HiddenFor(model => model.Id)
        @Html.HiddenFor(model => model.OrderId)
                
        <div class="editor-label">
            @Html.LabelFor(model => model.Product)
        </div>
        <div class="editor-field">
            @Html.ProductSelect("productId")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Quantity)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Quantity)
            @Html.ValidationMessageFor(model => model.Quantity)
        </div>

        <p>
            <input type="submit" value="@Strings.Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink(Strings.BackToList, "Details", new { id = Model.OrderId }, new { @class = "icon-button prev-icon" })

</div>

